<script setup lang="ts">
import { ref } from 'vue';
import { HelpFilled, Setting } from '@element-plus/icons-vue';

const nickname = ref('昵称未填写');
const fishValue = ref(0);
const avatarUrl = ref('http://localhost:80/qunar/personalcenter/@)M{J[B)4C@A3U3YE)1~_$9.png');
</script>

<template>
  <el-row class="user-info" align="middle">
    <el-col :span="12">
      <div class="left-content">
        <el-avatar
            class="avatar"
            :src="avatarUrl"
            size="large"
        ></el-avatar>
        <div class="info-text">
          <div class="nickname">{{ nickname }}</div>
          <div class="fish-value">鱼力值 {{ fishValue }}</div>
        </div>
      </div>
    </el-col>

    <el-col :span="12" class="action-area justify-end">
      <div class="action-item">
        <el-icon class="action-icon"><HelpFilled /></el-icon>
        <div class="action-label">帮助与客服</div>
      </div>
      <div class="action-item">
        <el-icon class="action-icon"><Setting /></el-icon>
        <div class="action-label">设置</div>
      </div>
    </el-col>
  </el-row>
</template>


<style scoped>
.user-info {
  padding: 16px;
  background: #f8f8f8;
  border-radius: 12px;
}

.left-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.info-text {
  flex: 1;
}

.nickname {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin-bottom: 4px;
}

.fish-value {
  font-size: 14px;
  color: #666;
}

.action-area {
  display: flex;
  gap: 24px;
}

.action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.action-icon {
  font-size: 24px;
  color: #666;
  transition: color 0.2s;
}

.action-icon:hover {
  color: #333;
}

.action-label {
  font-size: 12px;
  color: #666;
}
</style>